package com.aat.dizena.assist.web.controller;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.aat.dizena.base.CommonConstant;
import com.aat.dizena.base.web.controller.BaseController;
/**
 * @time 2016-05-25
 * @author 新歌<xingeking@163.com>
 * @email xingeking@163.com
 * @version v1.0
 * @function 
 * @info java spring aop
 * @update none
 */
@Controller
@Scope("prototype")
public class ActionIndexController extends BaseController {

	@Value("#{configProperties['page.index']}")
	private String pageIndex;

	@RequestMapping({ "", "index.do" })
	public String allIndex() {
		if (chkRole("user")) {
			return "redirect:/";
		}
		if (StringUtils.isNotEmpty(pageIndex)) {
			return pageIndex;
		}
		return CommonConstant.WEB_INDEX;
	}

}
